#!/usr/bin/perl
# configuration :
$logfile = "/usr/local/frogd/data/frogd.log";


# do not change anything after this line ...
# ne rien changer apres cette ligne
print "content-type: text/html\n\n";

print "<HTLM><BODY>\n";
print "<BR><BR><BR><BR><CENTER>\n";

open(FILE, $logfile);
@lignes = <FILE>;
$last=$lignes[$#lignes];
chop($last);
@element = split(/:/, $last);

print "<H1>Les donn&eacute;es actuelles sont : </H1><BR> \n";

print "date:";
system('date');

print "<BR>\n";

print "<H1>la temperature : $element[2]\n&deg; C</H1>";
print "<H1>la pression    : $element[3] hPa\n </H1>";
print "<H1>l'humidite     : $element[4]%\n </H1>";

print "<BR><BR><BR><BR>\n";
print "<A HREF=\"http://www.froggyhome.com\">http://www.froggyhome.com</A>  \n";
print "</BODY></HTML>\n";

close(FILE);
